package com.deng.util;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

public class MsgReader {

	private static InputStream in ;
	private static Properties prt;
	
	private void initProperties(){
		try{
			if(prt == null){
				in =  this.getClass().getResourceAsStream("Messages.properties");
				prt = new Properties();
				prt.load(in);
			}			
		}catch(Exception ex){
			ex.printStackTrace();
		}		
	}
	
	public String getPt(String key){
		initProperties();
		return prt.getProperty(key);
	}
	
}
